package com.ljt.realtimebusSS.domain.common;

import lombok.Data;

import java.io.Serializable;

@Data
public class BaseResponse<T> implements Serializable {
//    状态码
    private int code;
//    数据
    private T data;
//    信息
    private String msg;

    /**
     * 简单封装
     */
    public BaseResponse(int code, T data, String msg) {
        this.code = code;
        this.data = data;
        this.msg = msg;
    }

    /**
     * 进一步封装
     */
    public BaseResponse(int code, T data) {
        this(code, data,"");
    }
}
